<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateComplainsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('complains', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->integer('uid')->index()->comment("用户id");
            $table->string('order_id')->index()->comment("订单id");
            $table->text("description")->comment("描述信息");
            $table->integer("status")->default(0)->comment("状态：0等待处理，1已处理");
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('compains');
    }
}
